The Magic of Pushing Extrema into Recursion: Simple, Powerful Datalog Programs
نویسندگان
چکیده
We introduce a novel query optimization method based on pushing extrema and other integrity constraints into recursion. This optimization produces an efficient operational semantics for the goals declaratively specified by the original program that is stratified with respect to negation and aggregates. Complex algorithms can now be specified via simpler programs, and then implemented via optimized rules that use min and max aggregates in the seminaive fixpoint computation to achieve safe and efficient execution. This optimization dovetails with recent advances that entail the use of monotonic aggregates in recursion and leads to efficient implementation, as demonstrated by the scalable Datalog systems we have recently developed.
منابع مشابه
Theory and Practice of Logic Programming
FS-rules provide a powerful monotonic extension for Horn clauses that supports monotonic aggregates in recursion by reasoning on the multiplicity of occurrences satisfying existential goals. The least fixpoint semantics, and its equivalent least model semantics, hold for logic programs with FS-rules; moreover, generalized notions of stratification and stable models are easily derived when negat...
متن کاملA Monotonic Extension for Horn-Clauses and its Significance in Datalog's Renaissance
FS-rules provide a powerful monotonic extension for Horn clauses that supports monotonic aggregates in recursion by reasoning on the multiplicity of occurrences satisfying existential goals. The least fixpoint semantics, and its equivalent least model semantics, hold for logic programs with FS-rules; moreover, generalized notions of stratification and stable models are easily derived once negat...
متن کاملMagic-Sets for Datalog with Existential Quantifiers
Datalog∃ is the extension of Datalog allowing existentially quantified variables in rule heads. This language is highly expressive and enables easy and powerful knowledge-modelling, but the presence of existentially quantified variables makes reasoning over Datalog∃ undecidable in the general case. Restricted classes of Datalog∃, such as Shy, have been proposed in the literature with the aim of...
متن کاملSLDMagic | An Improved Magic Set Technique
We present a rewriting method for Datalog-programs which simulates SLD-resolution more closely than the ordinary \magic set" method does. This is especially advantageous in the case of tail-recursive programs, but already in non-recursive programs we can often save a number of joins. In contrast to the method of Ross 7], we do not only solve the problem of tail-recursion, but try to simulate SL...
متن کاملApproximating Constraint Propagation in Datalog
We present a technique exploiting Datalog with aggregates to improve the performance of programs with arithmetic (in)equalities. Our approach employs a source-to-source program transformation which approximates the propagation technique from Constraint Programming. The experimental evaluation of the approach shows good run time speedups on a range of non-recursive as well as recursive programs....
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2016